Section 1
Click on the link to see the "smooth" scrolling effect.
Click me to smooth scroll to section 2 belowNote: Remove the scroll-behavior property to remove smooth scrolling.
Revision:
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. Note that any other scrolls, such as those performed by the user, are not affected by this property. When this property is specified on the "root element", it applies to the viewport instead. This property specified on the "body element" will not propagate to the viewport.
The easiest way to add a smooth scroll animation is to set the scroll behavior property in CSS –e.g. body { scroll-behavior: smooth }
Syntax: scroll-behavior = auto | smooth | initial | inherit;
Syntax examples:
/* Keyword values */ scroll-behavior: auto; scroll-behavior: smooth; /* Global values */ scroll-behavior: inherit; scroll-behavior: initial; scroll-behavior: revert; scroll-behavior: revert-layer; scroll-behavior: unset;
Values:
auto: the scrolling box scrolls instantly;
smooth: the scrolling box scrolls in a smooth fashion using a user-agent-defined timing function over a user-agent-defined period of time. User agents should follow platform conventions, if any.
<div> <nav> <a class="navigation" href="#page-1">1</a> <a class="navigation" href="#page-2">2</a> <a class="navigation" href="#page-3">3</a> </nav> <div class="scroll-container"> <div class="scroll-page" id="page-1">1</div> <div class="scroll-page" id="page-2">2</div> <div class="scroll-page" id="page-3">3</div> </div> </div> <style> .navigation{display: inline-block; width: 5vw; text-decoration: none;} .navigation, .scroll-container {display: block; margin: 0 auto; text-align: center;} .navigation { width: 30vw; padding: 0.5vw; border: 0.1vw solid blue;} .scroll-container { width: 35vw; height: 20vw; overflow-y: scroll; scroll-behavior: smooth;} .scroll-page { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 5vw;} </style>
Click on the link to see the "smooth" scrolling effect.
Click me to smooth scroll to section 2 belowNote: Remove the scroll-behavior property to remove smooth scrolling.
<div> <div class="main" id="section1"> <h3>Section 1</h3> <p class="spec">Click on the link to see the "smooth" scrolling effect.</p> <a href="#section2">Click me to smooth scroll to section 2 below</a> <p>Note: Remove the scroll-behavior property to remove smooth scrolling.</p> </div> <div class="main" id="section2"> <h3>Section 2</h3> <a href="#section1">Click me to smooth scroll to section 1 above</a> </div> </div> <style> html {scroll-behavior: smooth;} #section1 {height: 40vw; background-color: pink;} #section2 {height: 40vw; background-color: yellow;} </style>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mattis justo ex, nec commodo metus pellentesque quis. Suspendisse lobortis eros elit, nec consequat sem posuere et. Aenean varius facilisis elit, a mattis ante bibendum a. Ut eu eleifend velit. Donec accumsan placerat massa quis egestas. Praesent vitae maximus nisl. Nulla ut dui quis purus tincidunt porta nec id eros. Vivamus in metus quis eros gravida finibus in sit amet elit. Maecenas eu sagittis augue. Nulla ut dolor et turpis vestibulum bibendum id at augue. Etiam eu faucibus sem.
Mauris nec magna nisi. Maecenas nec leo ullamcorper tellus eleifend lobortis. Nulla risus orci, porta non diam vitae, posuere efficitur risus. Sed lorem dolor, imperdiet quis condimentum in, posuere quis arcu. Aliquam ex ligula, blandit non elementum non, molestie at metus. Duis vestibulum facilisis leo bibendum vestibulum. Integer ac justo augue. Integer mi turpis, porttitor sit amet orci nec, convallis egestas tortor. Duis convallis sapien ut lorem convallis, nec tristique eros sodales. Quisque placerat elit vel quam condimentum, quis fermentum risus elementum. Donec eget tincidunt nisl, nec laoreet massa. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus at faucibus ligula. Ut eu rhoncus tellus.
Aliquam pretium lacus a ex tincidunt, et aliquet magna feugiat. Suspendisse sagittis condimentum pretium. Aenean a scelerisque arcu, consequat aliquet felis. Cras dictum nulla nec odio tincidunt faucibus. Nullam nec fermentum elit. Duis in velit vitae felis euismod dignissim ullamcorper non nisl. Nullam malesuada faucibus malesuada. Duis sem velit, viverra et diam tempus, convallis sodales orci. Mauris gravida eros at lorem varius dignissim. Vivamus nec nibh lorem.
Curabitur aliquet leo mi, non molestie orci mollis ut. Curabitur pretium, turpis rutrum tempus mattis, ex tellus lobortis sapien, vel vehicula urna purus ut ex. Sed at nisl sit amet nibh auctor hendrerit quis non est. Praesent hendrerit dui consectetur nisi lacinia, tincidunt scelerisque nunc condimentum. Etiam imperdiet nibh sed orci efficitur auctor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque neque quis lacus facilisis elementum. Sed nisl justo, vulputate non diam id, ornare luctus ligula. Praesent metus felis, feugiat non sapien eget, commodo aliquet risus. Integer congue lacinia nulla, ut vulputate augue. Suspendisse risus ex, eleifend at velit eget, ultricies hendrerit sem. Integer sit amet tincidunt erat, sed convallis sem.
Nam tristique mi eu lectus rutrum, vel porta magna pharetra. Vestibulum dictum leo dolor, non sagittis arcu elementum nec. Cras commodo erat sit amet dolor efficitur, a eleifend libero ultrices. Vivamus facilisis bibendum posuere. Etiam ornare massa sit amet blandit pharetra. Ut vel egestas mi. Duis tempor massa elit. Nulla nec neque magna. Vestibulum posuere facilisis justo, egestas vulputate neque pellentesque sit amet.
Back to top<main> <ul> <li><a href="#introduction">Introduction</a></li> <li><a href="#conclusion">Conclusion</a></li> </ul> <p> Lorem ipsum dolor sit amet... Etiam eu faucibus sem. </p> <p> Mauris nec magna nisi. ... Ut eu rhoncus tellus. </p> <h2 class="text" id="introduction">Introduction</h2> <p> Aliquam pretium lacus a ex tincidunt,... Vivamus nec nibh lorem. </p> <p> Curabitur aliquet leo mi, ... sed convallis sem. </p> <h2 class="text" id="conclusion">Conclusion</h2> <p> Nam tristique mi eu lectus rutrum,...egestas vulputate neque pellentesque sit amet. </p> <a id="to-top" href="#">Back to top</a> </main> <style> /* scrolling text */ :root {--blue: #74bcdd; --dark-blue: #2d3e51; --red: #f74442; --yellow: #fbca32; --green: #5be95b; --grey: #ebeced;} html {scroll-behavior: smooth;} main{width: 80%; margin-left: 10vw;} #to-top {position: fixed; bottom: 1vw; left: 1vw; padding: 1vw 1vw; background-color: var(--dark-blue); color: white; font-size: 1.15vw; font-weight: normal; text-decoration: none; border-radius: 2vw;} #to-top:hover {text-decoration: underline;} </style>
<div class="container"> <button id="top-2" onclick="scrTo(0,250)">scroll to 20vw from top</button> <div style="height: 10vw; width: 100%;"></div> <button onclick="scrBy(0,100)">scroll down 10vw from current</button> <div style="height:10vw; width:100%"></div> <button onclick="scrInto('#top')">go to top</button> </div> <script> function scrTo(x, y){ window.scroll({ left: x, top: y, behavior:"smooth" }); } function scrBy(x, y){ window.scrollBy({ let: x, top: y, behavior:"smooth" }); } function scrInto(id){ document.querySelector(id).scrollIntoView({ behavior:"smooth" }); } </script>
<div> <button id="top-3" onclick="sscroll('bottom');">Go to bottom</button> <div style="height: 40vw; width: 100%;"></div> <button id="bottom" onclick="sscroll('top');">Go to top</button> </div> <script> function sscroll(id) { // (A) SCROLL PARAMETERS var speed = 10, // Less = faster step = 30, // Less = smoother but slower click = 0; // (B) GET CURRENT Y POSITION + TARGET Y POSITION var fromY = self.pageYOffset ? self.pageYOffset : document.body.scrollTop ; var target = document.getElementById(id); var toY = target.offsetTop; while (target.offsetParent && target.offsetParent != document.body) { target = target.offsetParent; toY += target.offsetTop; } // (C) SCROLL ANIMATION - DOWNWARDS if (fromY < toY) { for (var i=fromY; i<=toY; i+=step) { if (i+step > toY) { setTimeout("window.scrollTo(0, " + toY + ")", click * speed); } else { setTimeout("window.scrollTo(0, " + i + ")", click * speed); } click++; } } // (D) SCROLL ANIMATION - UPWARDS else { for (var i=fromY; i>=toY; i-=step) { if (i-step < toY) { setTimeout("window.scrollTo(0, " + toY + ")", click * speed); } else { setTimeout("window.scrollTo(0, " + i + ")", click * speed); } click++; } } } </script>
The scrollbar set of CSS properties is a proprietary style hook letting designers create custom themes for the browser's native scrollbars.
Chrome, Edge, Safari and Opera support the non-standard ::-webkit-scrollbar pseudo element, which allows us to modify the look of the browser's scrollbar.
For webkit browsers, you can use the following pseudo elements to customize the browser's scrollbar:
::-webkit-scrollbar: the scrollbar.
::-webkit-scrollbar-button: the buttons on the scrollbar (arrows pointing upwards and downwards).
::-webkit-scrollbar-thumb: the draggable scrolling handle.
::-webkit-scrollbar-track: the track (progress bar) of the scrollbar.
::-webkit-scrollbar-track-piece: the track (progress bar) NOT covered by the handle.
::-webkit-scrollbar-corner: the bottom corner of the scrollbar, where both horizontal and vertical scrollbars meet.
::-webkit-resizer: the draggable resizing handle that appears at the bottom corner of some elements.
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
<div> <div class="container"> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum ... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> </div> </div> <style> .doos{width:30vw; height:40vw; overflow:scroll;} .doos::-webkit-scrollbar{width:1vw; background-color:aqua;border-radius:2vw;font-size: 1vw;} .doos::-webkit-scrollbar-track {box-shadow: inset 0 0 .6vw rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0 0 .6vw rgba(0, 0, 0, 0.3);} .doos::-webkit-scrollbar-thumb {background-color: crimson; outline: .5vw dotted green;} .doos::-webkit-scrollbar-thumb:hover { background: green;} .doos::-webkit-scrollbar-corner{ background: yellow;} </style>
<div> <div class="box"> <div> I have some experience... community. </div> </div><BR> <div class="box box-hide-scrollbar"> <div> I have some experience... community. </div> </div> </div> <style> .box {width: 30vw; overflow: scroll;} .box-hide-scrollbar::-webkit-scrollbar {display: none;} .box > div {margin-bottom: 1.5vw; padding: 1vw; background-color: lightgrey; border-radius: 1vw; font-size: 1.2vw; width: 50vw;} </style>
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
<div> <div class="container"> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum ... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> </div> </div> <style> .container{width:40vw; height: 30vw; overflow:scroll; overflow:scroll;} .container::-webkit-scrollbar {width: 1vw;} .container::-webkit-scrollbar-track {background: skyblue;} .container::-webkit-scrollbar-thumb {background: orange;} .container::-webkit-scrollbar-thumb:hover { background: green;} </style>
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
<div class="container-1"> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum ... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> <p class="spec">Lorem ipsum... ipsum </p> </div> </div> <style> .container-1{width:30vw; height: 30vw; overflow-y:scroll; overflow-x:scroll;} .container-1::-webkit-scrollbar {width: 1vw;} .container-1::-webkit-scrollbar-track {background: darkblue;} .container-1::-webkit-scrollbar-thumb {background: burlywood;} .container-1::-webkit-scrollbar-thumb:hover { background: red;} </style>